<?php
    class PriceInfo
    {
        public $product;
        public $volume;
        public $currency;
        public $unitPrice;
        public $volumePrice;
        public $percentageDiscount;
        public $validFrom;
        public $validTill;
        public $specialOfferId;
        public $purchaseUrl;
        
        public function Parse( XPathHelper $helper )
        {
            $this->product            = $helper->GetText("product");
            $this->volume             = $helper->GetText("volume");
            $this->currency           = $helper->GetText("currency");
            $this->unitPrice          = $helper->GetText("unit_price");
            $this->volumePrice        = $helper->GetText("volume_price");
            $this->percentageDiscount = str_replace( ".00", "", $helper->GetText("percentage_discount") );
            $this->validFrom          = $helper->GetText("valid_from");
            $this->validTill          = $helper->GetText("valid_till");
            $this->specialOfferId     = $helper->GetText("special_offer_id");
            $this->purchaseUrl        = $helper->GetText("purchase_url");
        }
    }
?>
